package com.example.cart_system.service.Impl;

import com.example.cart_system.mapper.GoodsMapper;
import com.example.cart_system.pojo.Goods;
import com.example.cart_system.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class GoodsServiceImpl implements GoodsService {
    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public void insertGoods(Goods goods) {
        goodsMapper.insertGoods(goods);
    }

    @Override
    public List<Goods> selectAllGoods() {
        return goodsMapper.selectAllGoods();
    }

    @Override
    public void deleteGoods(Goods goods) {
        goodsMapper.deleteGoods(goods);
    }
}
